<?php if ($this->posts_list) { ?>
<?php foreach($this->posts_list as $key => $val) { ?>
<div class="aw-item <?php if ($val['question_id']) { ?><?php if ($val['answer_count'] == 0) { ?>active<?php } ?><?php } else {?>article<?php } ?>" data-topic-id="<?php foreach ($val['topics'] AS $k => $v) { ?><?php echo $v['topic_id']; ?>,<?php } ?>">
     <div class="aw-zhidiu-rank">
     <?php if ($val['question_id']) { ?>
            <div class="aw-zhidiu-votes hidden-xs">
               <?php _e('%s', $val['focus_count']); ?>
               <small>关注</small>
            </div>
            <div class="aw-zhidiu-answers">
               <?php _e('%s', $val['answer_count']); ?>
               <small>回答</small>
            </div>
            <div class="aw-zhidiu-views hidden-xs">
                <?php _e('%s', $val['view_count']); ?>
                <small>浏览</small>
            </div>
            	<?php } else { ?>
            	  <div class="aw-zhidiu-votes hidden-xs">
                 <?php _e('%s', $val['votes']); ?>
                <small>投票</small>
            </div>
            <div class="aw-zhidiu-answers">
               <?php _e('%s', $val['comments']); ?>
               <small>回答</small>
            </div>
            <div class="aw-zhidiu-views hidden-xs">
                <?php _e('%s', $val['views']); ?>
                <small>浏览</small>
            </div>
            		<?php } ?>
    </div>
	<div class="aw-question-content">
	<p>
			<?php if ($val['question_id']) { ?>
			<?php if ($val['answer_count'] > 0) { ?>
			<?php if ($val['answer_info']['anonymous']) { ?>
				<a href="javascript:;" class="aw-user-name"><?php _e('匿名用户'); ?></a><?php } else { ?><a href="people/<?php echo $val['answer_info']['user_info']['url_token']; ?>" class="aw-user-name" data-id="<?php echo $val['answer_info']['user_info']['uid']; ?>"><?php echo $val['answer_info']['user_info']['user_name']; ?></a><?php } ?> 
				<span class="text-color-999"><?php echo date_friendly($val['update_time']); ?> <?php _e('回复问题'); ?>
				</span>
			<?php } else { ?>
			<?php if ($val['anonymous'] == 0) { ?>
				<a href="people/<?php echo $val['user_info']['url_token']; ?>" class="aw-user-name" data-id="<?php echo $val['user_info']['uid']; ?>"><?php echo $val['user_info']['user_name']; ?></a><?php } else { ?><a href="javascript:;" class="aw-user-name" data-id="<?php echo $val['uid']; ?>"><?php _e('匿名用户'); ?></a><?php } ?> 
				<span class="text-color-999"><?php echo date_friendly($val['add_time']); ?> <?php _e('发起讨论'); ?> 
				</span>
			<?php } ?>
			<?php } else { ?>
				<a href="people/<?php echo $val['user_info']['url_token']; ?>" class="aw-user-name" data-id="<?php echo $val['user_info']['uid']; ?>"><?php echo $val['user_info']['user_name']; ?></a> <span class="text-color-999"> 
				<?php echo date_friendly($val['add_time']); ?> <?php _e('发表了文章'); ?> 
				</span>
			<?php } ?>
		</p>
			<h4>
			<?php if ($val['question_id']) { ?>
			<a href="question/<?php echo $val['question_id']; ?>"><?php echo $val['question_content']; ?></a>
			
			<?php } else { ?>
			<a href="article/<?php echo $val['id']; ?>"><?php echo $val['title']; ?></a>
			<?php } ?>
		</h4>
		
		
	</div>
</div>
<?php } ?>
<?php } ?>